package com.jumi.microservice;


import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * 消息推送启动类
 *
 * @author Administrator
 */
@EnableDiscoveryClient
@SpringBootApplication
@EnableSwagger2
@MapperScan("com.jumi.microservice.mapper")
@ServletComponentScan
@EnableFeignClients
public class MessageProviderApplication {
    public static void main(String[] args) {
        SpringApplication.run(MessageProviderApplication.class, args);
    }

    /**
     * 开启mbp的分页
     * @return PaginationInterceptor 分页拦截器
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
